/*
 * lab10C1.c
 * CSIS 248 Lab #10
 */
#define _GNU_SOURCE
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

int main(int argc, char* argv[]){
   char* path = strdup( argv[0] );
   char* program_name = (char*) basename( path );
   char* here;
   const int size_here = 300;

   fprintf(stdout, "%s: starting ... \n", program_name );

   here = (char*) malloc( size_here );
   if ( getcwd(here, size_here) )
     printf("%s: executing in %s\n", program_name, here);
   else {
      fprintf(stderr, " %s: Unable to get wd.\n", argv[0] );
      return 1;
   }
}
